home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / editor / yg601win.zip / YFIND.MAN < prev    next >
Text File  |  1997-03-28  |  4KB  |  110 lines

  1. YFind(1)                  User Commands                  YFind(1)
  2.  
  3.  
  4.  
  5.  NAME
  6.      YFind - search a file for a pattern
  7.  
  8.  SYNOPSIS
  9.       YFind [ -bchilnsvw[1-9] ]  regular-expression
  10.           [ filename ... ]
  11.  
  12.  
  13.  DESCRIPTION
  14.      The YFind command searches files for a  pattern  and  prints
  15.      all  lines  that  contain  that  pattern.
  16.  
  17.      Normally, each line found is copied to standard output.  The
  18.      file name is printed before each line found if there is more
  19.      than one input file.
  20.  
  21.      Filenames can be specified with MS-DOS  "wild chars" such as
  22.      * and ? (common in most MS-DOS applications for "any string"
  23.      and "any character").
  24.  
  25.  
  26.  OPTIONS
  27.      The following options are supported:
  28.  
  29.        -S           Do not  interpret  the pattern  as a  regular
  30.                     expression,  but as a plain text and  use the
  31.             Soundex  algorithm  (match words sounding the
  32.             same as the pattern).
  33.  
  34.        -[0-9]       Do not  interpret  the pattern  as a  regular
  35.                     expression,  but as a plain text  and allow 0
  36.             (exact  match)   to  9  errors/approximations
  37.             (very imprecise match).
  38.  
  39.        -b           Precede each line  by  the  block  number  on
  40.                     which  it  was  found.  This can be useful in
  41.                     locating  block  numbers  by  context  (first
  42.                     block is 0, each block is 512 bytes long).
  43.  
  44.        -c           Print only a count of the lines that  contain
  45.                     the pattern.
  46.  
  47.        -f           Precede each line by the name of the file.
  48.  
  49.        -i           Ignore upper/lower  case  distinction  during
  50.                     comparisons.
  51.  
  52.        -n           Precede each line by its line number  in  the
  53.                     file (first line is 1).
  54.  
  55.        -s           Suppress error messages about nonexistent  or
  56.                     unreadable files
  57.  
  58.        -v           Print all lines except those that contain the
  59.                     pattern.
  60.  
  61.  
  62.  EXAMPLES
  63.      To find all uses of the word "Posix" (in any  case)  in  the
  64.      file  text.mm, and write with line numbers:
  65.  
  66.            example% YFind -i -n posix text.mm
  67.  
  68.      To find all empty lines in the standard input:
  69.  
  70.            example% YFind ^$
  71.      or
  72.            example% YFind -v .
  73.  
  74.      To find all uses of either "toto", "tota" or "toti"  in  the
  75.      file  text.txt, and write with line numbers:
  76.  
  77.            example% YFind -1 -n toto text.txt
  78.  
  79.  EXIT STATUS
  80.      The following exit values are returned:
  81.  
  82.        0            one or more matches were found
  83.  
  84.        1            no matches were found
  85.  
  86.        2            syntax errors or inaccessible files (even  if
  87.                     matches were found).
  88.  
  89.  NOTES
  90.      Lines  are  limited  to  1024  characters; longer  lines  are
  91.      truncated.
  92.  
  93.      YFind  does not  use the  Soundex  algorithm  provided by the
  94.      YGrep Search  Engine.  It is  limited  to  approximative  and
  95.      regular expression searches.
  96.  
  97.      When conflicting options are set, the following order decides
  98.      which one will be choosen:
  99.       Most influential
  100.         - Soundex (-S)
  101.     - Approximative (-[1-9])
  102.     - exact match (-0)
  103.     - regular expressions (others)
  104.       Least influential
  105.  
  106.  INSTALLATION
  107.      YFind is to be installed in the same directory as YGrep32.DLL
  108.      in order to  find it when needed for operation.  The simplest
  109.      location is certainly the C:\WINDOWS directory.
  110.